{% extends "ft/base.html" %}
{% load cache %}
{% block title %}天天生鲜-首页{% endblock %}
{% block css %}

{% endblock %}
{% block content %}
    <!--首页头部搜索栏导航-->
    <header class="container">
        <div class="col-xs-12 col-sm-3">
            <img src="/static/ft/img/logo.png"/>
        </div>
        <div class="col-xs-12 col-sm-6 makepos">
            <div class="input-group">
                <input type="text" class="form-control" placeholder="搜索商品">
                <span class="input-group-btn">
                    <button class="btn btn-success" type="button">搜&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;索</button>
                </span>
            </div><!-- /input-group -->
        </div>
        <div class="col-xs-12 col-sm-3">
            <button class="btn btn-success pull-right" type="button">
                <img src="/static/ft/img/cart.png"/>我的购物车 <span class="badge">4</span>
            </button>
        </div>
    </header>
    <!--首页头部轮播列表栏导航-->
    <menu class="container">
        <div class="col-xs-12 col-sm-2">
            <ul class="list-group">
                <li class="list-group-item active">全部商品分类</li>

                {% for goodstype in goodstype_list %}
                    <li class="list-group-item"><a href="#goodstype_{{ goodstype.id }}"><img
                            src="/static/ft/img/goodstype_{{ goodstype.id }}.png"/>{{ goodstype.name }}&nbsp;&nbsp;></a>
                    </li>
                {% endfor %}
            </ul>
        </div>
        <div class="col-xs-12 col-sm-10">
            <ul class="nav nav-tabs">
                <li role="presentation" class="active"><a href="index.html">首页</a></li>
                <li role="presentation"><a href="#">手机生鲜</a></li>
                <li role="presentation"><a href="#">抽奖</a></li>
            </ul>
            <div class="col-xs-12 col-sm-9">
                <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
                    <!-- Indicators -->
                    <ol class="carousel-indicators">
                        <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
                        <li data-target="#carousel-example-generic" data-slide-to="1"></li>
                        <li data-target="#carousel-example-generic" data-slide-to="2"></li>
                        <li data-target="#carousel-example-generic" data-slide-to="3"></li>
                    </ol>
                    <!-- Wrapper for slides -->
                    <div class="carousel-inner" role="listbox">
                        <div class="item active">
                            <img src="/static/ft/img/slide.jpg">
                        </div>
                        <div class="item">
                            <img src="/static/ft/img/slide02.jpg">
                        </div>
                        <div class="item">
                            <img src="/static/ft/img/slide03.jpg">
                        </div>
                        <div class="item">
                            <img src="/static/ft/img/slide04.jpg">
                        </div>
                    </div>

                    <!-- Controls -->
                    <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
                        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                        <span class="sr-only">Previous</span>
                    </a>
                    <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
                        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                        <span class="sr-only">Next</span>
                    </a>
                </div>
            </div>
            <div class="col-xs-12 col-sm-3">
                <img src="/static/ft/img/adv01.jpg" class="mypic"/>
                <img src="/static/ft/img/adv02.jpg" class="mypic"/>
            </div>
        </div>
    </menu>
    <!--商品分类列表水平栏-->
    {% for goodstype in goodstype_list %}
        <section class="container" id="goodstype_{{ goodstype.id }}">
            <div class="panel panel-success">
                <div class="panel-heading">{{ goodstype.name }}
                    <div class="pull-right"><a href="/ft/goods/list2/?goodstype_id={{ goodstype.id }}">查看更多...</a></div>
                </div>
                <div class="panel-body">
                    <div class="col-xs-12 col-sm-2">
                        <img src="/static/ft/img/banner0{{ goodstype.id }}.jpg" class="img-responsive">
                    </div>
                    {% for goods in goodstype.new5 %}
                        <div class="col-xs-12 col-sm-2">
                            <a href="/ft/detail/?goods_id={{ goods.id }}" class="thumbnail">
                                <p class="text-center">{{ goods.name }}</p><br/>
                                <img src="/static/bg/img/{{ goods.picture }}" class="img-responsive">
                                <p class="text-center">¥{{ goods.price }}元</p>
                            </a>
                        </div>
                    {% endfor %}
                </div>
            </div>
        </section>
    {% endfor %}
{% endblock %}
{% block js %}{% endblock %}
